package cn.cxy.wanandroid.modules.query

import cn.cxy.wanandroid.network.BaseRepository
import cn.cxy.wanandroid.network.RetrofitManager

class QueryRepository : BaseRepository() {
    suspend fun collectArticle(id: Int) =
        executeRequest { RetrofitManager.getService().collectArticle(id) }

    suspend fun uncollectArticle(id: Int) =
        executeRequest { RetrofitManager.getService().uncollectArticle(id) }

    suspend fun getHotKey() =
        executeRequest { RetrofitManager.getService().hotKey() }

    suspend fun query(pageNum: Int, k: String) =
        executeRequest { RetrofitManager.getService().query(pageNum, k) }

}